package top.bug.blog.common;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author <a href="https://github.com/jiusi66">九思.</a>
 * @email 10837907@qq.com
 * @from <a href="https://www.52bug.top">递归茶馆-www.52bug.top</a>
 * @description 公共PO父类
 */
@Data
public class BasePO {
    @ApiModelProperty("主键id")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("创建者")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty("更新者")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_on", fill = FieldFill.INSERT)
    private LocalDateTime createOn;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_on", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateOn;

    @ApiModelProperty("逻辑删除（0-否 1-是）")
    @TableField("is_delete")
    private String isDelete;
}